#include<iostream>
#include<cstring>
using namespace std;
const int N = 1e5 + 10;
int h[N], ne[N], e[N], index;
int ans[N], cnt;
int d[N];
int n, m;
int q[N];
void add(int a, int b)
{
	e[index] = b;
	ne[index] = h[a];
	h[a] = index++;
}

bool tuopu()
{
	int hh = 0, tt = -1;
	for (int i = 1; i <= n; i++) {
		if (!d[i]) {
			q[++tt] = i;
		}
	}
	while (hh <= tt) {
		int t = q[hh++];
		ans[++cnt] = t;
		for (int i = h[t]; i != -1; i = ne[i]) {
			int j = e[i];
			d[j] --; 
			if (!d[j]) {
				q[++tt] = j;
			}
		}
	}
	return cnt == n;
}
int main()
{
	memset(h, -1, sizeof(h));
	cin >> n >> m;
	while (m--) {
		int a, b;
		cin >> a >> b;
		add(a, b);
		d[b]++;
	}
	if (tuopu()) {
		for (int i = 1; i <= n; i++) {
			cout << ans[i] << " ";
		}
	}
	else {
		puts("-1");
	}
	return 0;
}